package com.twu.biblioteca;

import java.util.ArrayList;
import java.util.Iterator;

/**
 * User: akerber
 * Date: 1/31/13
 * Time: 3:15 PM
 */
public class MovieCatalog {
    ArrayList<Movie> catalog;
    DisplayMessage displayMessage;

    public MovieCatalog(DisplayMessage displayMessage){
        catalog = new ArrayList<Movie>();
        this.displayMessage = displayMessage;
    }

    public void showAllMovies() {
        Iterator<Movie> it=null;
        for(it=catalog.iterator();it.hasNext();)
        {
            displayMessage.showMovieInformation(it.next());
        }
    }

    public void addMovie(Movie movie) {
        catalog.add(movie);

    }
}
